Differential hysteresis comparator circuits and methods

ABSTRACT

A comparator circuit for providing hysteresis comprises first and second differentially coupled transistors. The first of the differentially coupled transistors provides drain current to first and second load transistors. The second of the differentially coupled transistors provides drain current to third and fourth load transistors. In one example embodiment, the drain of the first of the differentially coupled transistors also drives the gate of the first and third load transistors, while the drain of the second of the differentially coupled transistors drives the gate of the second and fourth transistors.

CROSS REFERENCE TO RELATED APPLICATIONS

This is a continuation of and claims the benefit of U.S. patentapplication Ser. No. 12/391,200, filed Feb. 23, 2009, now U.S. Pat. No.7,843,230, entitled “Differential Hysteresis Comparator Circuits andMethods,” naming David Gozali and Hong Liang Zhang as inventors, thecontent of which is hereby incorporated herein by reference in itsentirety, and which claimed the benefit of commonly-assigned U.S.Provisional Patent Application No. 61/033,125, filed Mar. 3, 2008.

BACKGROUND

This invention relates generally to electrical circuits, and moreparticularly to comparators.

FIG. 1 illustrates a prior art comparator 1 for comparing an inputvoltage Vin with a reference voltage Vref and generating an outputvoltage Vout therefrom. Voltage Vin is applied to a voltage divider 2comprising resistors R1, R2 and R3. Voltage divider 2 is coupled toprovide a voltage VDIV to the gate of a transistor T1 via one of twoswitches SW1, SW2. When voltage VDIV exceeds reference voltage Vref,transistor T2 passes more current than transistor T1, the voltage atnode 5 exceeds the voltage at node 4, and output voltage Vout is high.When voltage Vref exceeds voltage VDIV, transistor T1 passes morecurrent than transistor T2, the voltage at node 4 exceeds the voltage atnode 5, and voltage Vout is low.

As mentioned above, voltage VDIV is established by series-coupledresistors R1, R2 and R3 and switches SW1, SW2. Switches SW1 and SW2 arecontrolled to vary voltage VDIV such that comparator 1 exhibitshysteresis.

SUMMARY

In one embodiment, the present invention includes a comparator circuitcomprising first and second transistors coupled as a differential pair.A control terminal of the first transistor is coupled to receive a firstinput voltage, and a control terminal of the second transistor coupledto receive a second input voltage. The differential pair is coupled topass a first current through a first terminal of the differential pairand a second current through a second terminal of the differential pair.The first and second currents are responsive to a comparison of thefirst and second input voltages. The circuit further includes a thirdtransistor coupled to pass a first portion of the first current inresponse to the voltage at the first terminal of the differential pairand a fourth transistor coupled to pass a first portion of the secondcurrent in response to the voltage at the first terminal of thedifferential pair. The current flowing through the third and fourthtransistors cause the comparator circuit to exhibit hysteresis.

In one embodiment, the comparator circuit further comprises a fifthtransistor passing a second portion of the first current in response tothe voltage at the second terminal, and a sixth transistor passing asecond portion of the second current in response to the voltage at thesecond terminal.

In one embodiment, a control terminal of the third transistor is coupledto a control terminal of the fourth transistor, and wherein a controlterminal of the fifth transistor is coupled to a control terminal of thesixth transistor.

In one embodiment, the control terminals of the third and fourthtransistors are coupled to a first output terminal of the comparator andthe control terminals of the fifth and sixth transistors are coupled toa second output terminal of the comparator.

In one embodiment, the control terminals of the third and fourthtransistors are coupled to at least one output terminal of thecomparator through one or more current mirrors and the control terminalsof the fifth and sixth transistors are coupled to at least one outputterminal of the comparator through one or more current mirrors.

In one embodiment, the comparator circuit further comprises a seconddifferential pair including a first control terminal to receive a thirdinput voltage and a second control terminal to receive a fourth inputvoltage, the differential pair coupled to pass a third current through afirst terminal of the second differential pair and a fourth currentthrough a second terminal of the second differential pair, the third andfourth currents being responsive to a comparison of the third and fourthinput voltages, a seventh transistor having a drain and a gate coupledto the first terminal of the second differential pair, an eighthtransistor having a gate coupled to the first terminal of the seconddifferential pair and drain coupled to the second terminal of the seconddifferential pair, a ninth transistor having a drain and a gate coupledto the second terminal of the second differential pair, a tenthtransistor having a gate coupled to the second terminal of the seconddifferential pair and drain coupled to the first terminal of the seconddifferential pair, wherein current through the third and fourthtransistors is mirrored to a first output terminal and current throughthe seventh and eighth transistors is mirrored to the first outputterminal, and wherein current through the fifth and sixth transistors ismirrored to a second output terminal and current through the ninth andtenth transistors is mirrored to the second output terminal.

In one embodiment, the comparator circuit further comprises a seconddifferential pair including a first control terminal to receive a thirdinput voltage and a second control terminal to receive a fourth inputvoltage, the second differential pair coupled to pass a third currentthrough a first terminal of the second differential pair and a fourthcurrent through a second terminal of the second differential pair, thethird and fourth currents being responsive to a comparison of the thirdand fourth input voltages, wherein the third transistor has a gate and adrain coupled to the first terminal of the second differential pair andthe fourth transistor has a gate coupled to the first terminal of thesecond differential pair and a drain coupled to the second terminal ofthe second differential pair, and wherein the sixth transistor has agate and a drain coupled to the second terminal of the seconddifferential pair and the fifth transistor has a gate coupled to thesecond terminal of the second differential pair and a drain coupled tothe first terminal of the second differential pair.

In one embodiment, the third and fourth transistor each have a gatelength and a gate width, and wherein the hysteresis exhibited by thecomparator is based on the ratio of the gate width to gate length of thethird transistor to the gate width to gate length of the fourthtransistor.

In one embodiment, the comparator circuit further comprises a currentsource providing a current into a node, the node being coupled to asecond terminal of the first transistor and a second terminal of thesecond transistor.

In another embodiment, the present invention includes a systemcomprising a comparator circuit, the comparator circuit comprising firstand second transistors coupled as a differential pair, a controlterminal of the first transistor coupled to receive a first inputvoltage, a control terminal of the second transistor coupled to receivea second input voltage, the differential pair coupled to pass a firstcurrent through a first terminal of the differential pair and a secondcurrent through a second terminal of the differential pair, the firstand second currents being responsive to a comparison of the first andsecond input voltages, a third transistor coupled to pass a firstportion of the first current in response to the voltage at the firstterminal, a fourth transistor coupled to pass a first portion of thesecond current in response to the voltage at the first terminal, whereinthe current flowing through the third and fourth transistors cause thecomparator circuit to exhibit hysteresis.

In one embodiment, the system comprises an integrated circuit.

In another embodiment, the present invention includes a method forcomparing two input voltages comprising receiving a first input voltageat a first control terminal of a differential circuit and a second inputvoltage at a second control terminal of the differential circuit,generating first current at a first terminal of the differential circuitand a second current at a second terminal of the differential circuit,the first and second currents being responsive to a comparison of thefirst and second input voltages, passing a first portion of the firstcurrent through a terminal of a first transistor in response to avoltage at the first terminal of the differential circuit, and passing afirst portion of the second current through a terminal of a secondtransistor in response to the voltage at the first terminal of thedifferential circuit, wherein the current flowing through the third andfourth transistors cause the comparator circuit to exhibit hysteresis.

In one embodiment, the first transistor has a gate and a drain coupledto the first terminal of the differential circuit and the secondtransistor has a gate coupled to the first terminal of the differentialcircuit and a drain coupled to the second terminal of the differentialcircuit.

In one embodiment, the method further comprises passing a second portionof the first current through a terminal of a third transistor inresponse to the voltage at the second terminal of the differentialcircuit, and passing a second portion of the second current through aterminal of a fourth transistor in response to the voltage at the secondterminal of the differential circuit.

In one embodiment, the fourth transistor has a gate and a drain coupledto the second terminal of the differential circuit and the thirdtransistor has a gate coupled to the second terminal of the differentialcircuit and a drain coupled to the first terminal of the differentialcircuit.

In one embodiment, the method further comprises mirroring currentthrough the first transistor to at least one output terminal andmirroring current through the fourth transistor to at least one outputterminal.

The third, fourth, fifth and sixth transistors are typically MOStransistors having channels characterized by a width and a length. Theamount of hysteresis exhibited by the comparator is established as afunction of the ratio of (W/L)₄ to (W/L)₅, and the ratio of (W/L)₃ to(W/L)₆, where (W/L)₃, (W/L)₄, (W/L)₅ and (W/L)₆ are the widths dividedby lengths of the third, fourth, fifth and sixth transistors,respectively.

Additional embodiments will be evident from the following detaileddescription and accompanying drawings, which provide a betterunderstanding of the nature and advantages of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically illustrates a prior art comparator that exhibitshysteresis.

FIG. 2 schematically illustrates one implementation of a comparator.

FIG. 3A schematically illustrates an over-current protection circuitincluding comparators.

FIG. 3B schematically illustrates in detail the comparators within thecircuit of FIG. 3A.

FIG. 3C illustrates signal waveforms associated with the circuit ofFIGS. 3A and 3B.

FIG. 4 schematically illustrates one implementation of a pair ofcomparators.

DETAILED DESCRIPTION

FIG. 2 illustrates a comparator 100 constructed in accordance with oneimplementation of the invention. Comparator 100 comprises transistorsT11 and T12 coupled to respectively receive differential input voltagesVin1 and Vin2. Either or both of voltages Vin1 and Vin2 can be signalsor reference voltages. The drains of transistors T11 and T12 are coupledto a current source 102 which passes a current IS. Current source 102 iscoupled to receive a DC voltage VDD. In one exemplary implementation,VDD is about 3 V.

The drain of transistor T11 is coupled to the gates of transistors T13and T14 and the drains of transistor T13 and T15. Similarly, the drainof transistor T12 is coupled to the gates of transistors T15 and T16 andthe drain of transistors T14 and T16. Comparator 100 provides outputvoltages Vout1 and Vout2 at output terminals 104 and 106 in response toinput voltages Vin1 and Vin2. As explained below, transistors T14 andT15 cause comparator 100 to exhibit hysteresis. The amount of hysteresisdepends upon the ratio of W14/L14 to W13/L13 and the ratio of W15/L15 toW16/L16, where W13 to W16 and L13 to L16 are the channel widths andlengths of transistors T13 to T16, respectively.

Also as explained in more detail below, if Vin1 is less than Vin2,transistor T11 passes more current than transistor T12, voltage Vout1 isgreater than voltage Vout2, and transistors T13 and T14 are drivenfurther into the on state than transistors T15 and T16. As voltage Vin1rises above voltage Vin2 (or equivalently, as voltage Vin2 falls belowvoltage Vin1), the amount of current ID12 passing through transistor T12increases. However, a portion of current ID12 is drawn throughtransistor T14, thereby preventing voltage Vout2 from quickly rising.Voltage Vout2 will not rise until current ID 12 is great enough to pullvoltage Vout2 high despite current ID14 being drawn through transistorT14. In this way, comparator 100 exhibits hysteresis. The samephenomenon occurs when voltage Vin1 falls below voltage Vin2 (orequivalently, voltage Vin2 rises above voltage Vin1), and a portion ofcurrent ID11 passes through transistor T15, thereby causing comparator100 to exhibit hysteresis.

Assume that current IA (the current flowing through transistor T11)comprises a superposition of DC and AC components. Accordingly,IA=(IS/2)+(gm11)(vgs11)  (Equation 1)IA=(IS/2)+(gm11)(Vin12−Vin11)/2  (Equation 2)where vgs11 is the AC component of the voltage across the gate andsource of transistor T11 and gm11 is the gate-to-drain transferconductance of transistor T11.

Also assume that Vout1>Vout2, T15 and T16 are off, and T13 and T14 areabout to turn off. In other words, no current is flowing through T15 andT16. This meansID13=(β13/2)(Vgs13−Vthn)² ≈ID11  (Equation 3)ID14=(β14/2)(Vgs14−Vthn)² ≈ID12  (Equation 4)Vgs13=Vgs14  (Equation 5)where ID13 is the drain current through transistor T13, β13 is the betaof transistor T13 (the beta of a transistor is proportional to the widthdivided by length of a transistor), Vgs13 is the voltage across the gateand source of transistor T13, Vthn is the threshold voltage oftransistors T13-T16, ID14 is the drain current through transistor T14,β14 is the beta of transistor T14, and Vgs14 is the voltage across thegate and source of transistor T14.

It can be seen from the foregoing thatβ13/β14≈ID11/ID12.  (Equation 6)From equations 1-6, it can be concluded thatVin1−Vin2=(ID11/gm11)((β13/β14)−1)  (Equation 7)Similarly, if transistors T15 and T16 are about to turn off, andtransistors T13 and T14 are already off,Vin2−Vin1=(ID12/gm12)((β15/β16)−1)  (Equation 8)where gm2 is the gate to drain transfer conductance of transistor T12,β15 is the beta of transistor T15 and β16 is the beta of transistor T16.

Since the beta of a transistor is proportional to the width of thetransistor divided by the length of the transistor, it can be seen fromequation 7 that the hysteresis can be adjusted by changing a) the ratioof (W14/L14) to (W15/L15) and b) the ratio of (W13/L13) to (W16/L16),where W13, W14, W15 and W16 are the widths of transistors T13, T14, T15and T16, respectively, and L13, L14, L15 and L16 are the lengths oftransistors T13, T14, T15 and T16, respectively.

In an alternative implementation, one can replace one MOS transistorwith two MOS transistors connected in parallel between two nodes with acommonly connected control gate. Two such connected MOS transistors actas one transistor having a width equal to the sum of the widths of theparallel connected transistors.

In another implementation, back to back inverters I1 and I2 may be addedacross the outputs Vout1 and Vout2 to improve the gain. One inverter hasan input terminal coupled to Vout1 and an output terminal coupled toVout2. A second inverter has an input terminal coupled to Vout2 and anoutput terminal coupled to Vout1.

Hysteresis has several advantages. For example, if the two input signalsVin1 and Vin2 are very close, hysteresis helps prevent a) noise fromcausing a false output comparison signal; and b) the output signals fromoscillating.

Comparator 100 can be used in many different types of electricalcircuits. In one exemplary implementation, the comparator can be used aspart of an over-current detection and protection circuit 200 (see FIG.3A). Circuit 200 may be included in a power management system, forexample. Circuit 200 includes a comparator 201 comprising an inputterminal for receiving an input current Iin, and a pair of outputterminals 202, 203 for providing differential output signals Vp, Vn,respectively. Signal Vp and a reference voltage Vrefp are applied toinput terminals of a comparator 206. Similarly, voltages Vn and Vrefnare applied to input terminals of a comparator 209. It is to beunderstood that comparators 206 and 209 may be a single differentialcomparator as illustrated in FIG. 3B, which may have four (4) inputscomprising two input signals (e.g., Vp and Vn) and two referencevoltages (e.g., Vrefp and Vrefn). Such a comparator is illustrated ingreater detail in FIG. 3B.

Referring to FIG. 3B, comparator 206 comprises an input terminal forreceiving input voltage Vrefn, a second input terminal for receivinginput signal Vn, a current source 214 for passing a current IS1, Pchannel transistors T17 and T18, N channel transistors T19, T20, T21 andT22, and output leads 216 and 218. The first comparator is the same ascomparator 100 of FIG. 2.

Second comparator 209 comprises an input terminal for receiving inputsignal Vp, a second input terminal for receiving input reference voltageVrefp, a current source 226 for passing a current IS2, N channeltransistors T23 and T24, P channel transistors T25, T26, T27 and T28,and output leads 228 and 230. The first and second comparators of FIG.3B are essentially identical, except that the transistor types arereversed.

Output leads 228 and 230 drive the gates of P channel transistors T29and T30, respectively. Output leads 216 and 218 drive the gates of Nchannel transistors T31 and T32 respectively. Transistors T29 and T31act as an inverter providing an output signal Vop, while transistors T30and T32 act as an inverter providing an output signal Von.

FIG. 3C is a waveform diagram illustrating signals Vp, Vrefp, Vn andVrefn. In one exemplary embodiment, voltages Vrefp equals 2.125 volts,voltage Vrefn equals 0.875 volts, VSS is zero volts and VDD is 3 volts.However, these values are merely examples, and other voltages can alsobe used. As current Iin rises, voltage Vp rises above voltage Vrefp andvoltage Vn falls below Vrefn. Voltages Vp and Vn are as follows:Vp=VCM+K (Iin)  (Equation 9)Vn=VCM−K (Iin)  (Equation 10)where VCM is the common mode voltage present at output leads 202 and 203and K is the gain of circuit. Unfortunately, VCM varies (in somecircumstances by as much as 31 millivolts), and this is undesirable. Inorder to make circuit 200 more stable, comparators 206 and 207 exhibit ahysteresis voltage VH between 50 and 100 millivolts. Again, these valuesare merely exemplary. Because of the hysteresis, voltage Vop only goeshigh when voltage Vp exceeds Vrefp by VH, voltage Vop only goes low whenvoltage Vp falls below Vrefp by VH, voltage Von only goes low whenvoltage Vn falls below Vrefn by VH, and voltage Von only goes high whenvoltage Vn rises above voltage Vrefn by VH.

It will be appreciated that comparator circuits 206 and 209 in FIG. 3Bcompare voltage Vp to Vrefp and Vn to Vrefn. This dual comparison helpseliminate the effect of the VCM.

In the implementation described above, comparators 206 and 209 exhibitthe same amount of hysteresis VH, both in the rising and fallingdirections. However, in other implementations, comparators 206 and 209can exhibit different amounts of hysteresis from each other, anddifferent amounts of hysteresis in the rising and falling directions.This is accomplished by altering the ratio of widths to lengths ofappropriate ones of transistors T19-T22 for comparator 209, orappropriate ones of transistors T25-T28 for comparator 206. In yet otherimplementations, comparators 206 and 209 can exhibit hysteresis in onlyone direction (e.g., rising but not falling, or falling but not rising).This is accomplished by eliminating an appropriate one of transistorsT26 or T27 for comparator 206, or an appropriate one of transistors T20or T21 for comparator 209.

Circuit 200 uses a pair of P channel transistors T17, T18 to comparevoltage Vrefn and Vn, and N channel transistors to compare voltagesVrefp and Vp. Depending upon the voltages being compared, this helpsmaintain the linearity of circuit 200. However, as described below, inother embodiments, one can use two pairs of N channel transistors or twopairs of P channel transistors for the differential pairs.

FIG. 4 illustrates a circuit 400 comprising a pair of comparatorsconstructed in accordance with another implementation of the invention.One main difference between the circuit of FIGS. 3B and 4 is thatinstead of providing one pair of differentially coupled N channeltransistors T23 and T24 and one pair of differentially coupled P channeltransistors T17 and T18, circuit 400 comprises a pair of N channeltransistors T40, T41 for comparing signal Vn and signal Vrefn and asecond pair of N channel transistors T42, T43 for comparing signal Vpand Signal Vrefp. The drain of transistor T40 is coupled to the drain ofP channel transistors T44 and T45. The drain of transistor T41 iscoupled to the drain of P channel transistors T46 and T47. The drain oftransistor T42 is coupled to the drain of P channel transistors T44 andT45. The drain of transistor T43 is coupled to the drain of P channeltransistors T47 and T46.

The sources of transistors T40 and T41 are coupled to a current source402, while the sources of transistors T42 and T43 are coupled to acurrent source 404.

The voltage at node 406 drives the gates of transistors T44 and T47,while the voltage at node 408 drives the gates of transistors T45 andT46.

While the invention has been described with respect to differentimplementations, various modifications can be made in form and detailwithout departing from the scope of the invention. For example, thetransistor types shown in the drawings can be switched (e.g., from Pchannel to N channel and vice versa). Similarly, other components can beadded to circuits described above. The comparator can be used to comparetwo data signals, two reference voltages, combinations of signals andvoltages, etc. Accordingly, all such changes are within the scope of thepresent invention.

What is claimed is:
 1. An apparatus comprising: a first circuitconfigured to compare a first input voltage with a second input voltage,wherein the first circuit outputs a first output voltage at a firstoutput and a second output voltage at a second output based on thecomparison of the first input voltage and the second input voltage; anda second circuit configured to compare a third input voltage with afourth input voltage, wherein the second circuit outputs a third outputvoltage at a third output and a fourth output voltage at a fourth outputbased on the comparison of the third input voltage and the fourth inputvoltage, wherein the first circuit is configured to draw a first portionof current from the second output or draw a second portion of currentfrom the first output to cause the first circuit to exhibit a firsthysteresis, and wherein the second circuit is configured to draw a thirdportion of current from the fourth output or draw a fourth portion ofcurrent from the third output to cause the second circuit to exhibit asecond hysteresis, and wherein a total amount of hysteresis in the firsthysteresis and second hysteresis is configurable based on a ratiobetween transistor widths in the first circuit and second circuit. 2.The apparatus of claim 1, further comprising a third circuit configuredto receive an input current and output the first input voltage to thefirst circuit and the third input voltage to the second circuit.
 3. Theapparatus of claim 2, wherein: the second input voltage comprises afirst reference voltage; and the fourth input voltage comprises a secondreference voltage.
 4. The apparatus of claim 1, wherein: the firstcircuit comprises a first comparator; and the second circuit comprises asecond comparator.
 5. The apparatus of claim 1, wherein the firstcircuit and the second circuit comprise a single differentialcomparator.
 6. The apparatus of claim 1, wherein first input voltage andthe third input voltage comprise a common mode voltage, wherein thefirst hysteresis exhibited by the first circuit and the secondhysteresis exhibited by the second circuit are both greater than avariance of the common mode voltage.
 7. The apparatus of claim 1,wherein first hysteresis is a same amount as the second hysteresis. 8.The apparatus of claim 1, wherein first hysteresis is a different amountfrom the second hysteresis.
 9. The apparatus of claim 1, wherein firsthysteresis or the second hysteresis exhibit a different amount ofhysteresis in a rising direction and a falling direction.
 10. Theapparatus of claim 1, wherein an amount of hysteresis of the firsthysteresis or the second hysteresis is varied by varying a respectivewidth of a transistor in the first circuit or the second circuit. 11.The apparatus of claim 1, wherein the first hysteresis and the secondhysteresis are provided without a resistor divider network.
 12. Theapparatus of claim 1, wherein the first hysteresis and the secondhysteresis are provided without varying the first input voltage or thethird input voltage.
 13. The apparatus of claim 1, wherein the firstcircuit and the second circuit are used in an over-current detectioncircuit.
 14. A method comprising: comparing, with a first circuit, afirst input voltage with a second input voltage; outputting a firstoutput voltage at a first output and a second output voltage at a secondoutput based on the comparison of the first input voltage and the secondinput voltage; comparing, with a second circuit, a third input voltagewith a fourth input voltage; outputting a third output voltage at athird output and a fourth output voltage at a fourth output based on thecomparison of the third input voltage and the fourth input voltage;drawing a first portion of current from the second output or drawing asecond portion of current from the first output to cause the firstcircuit to exhibit a first hysteresis; and drawing a third portion ofcurrent from the fourth output or drawing a fourth portion of currentfrom the third output to cause the second circuit to exhibit a secondhysteresis, and wherein a total amount of hysteresis in the firsthysteresis and second hysteresis is configurable based on a ratiobetween transistor widths in the first circuit and second circuit. 15.The method of claim 14, further comprising: receiving an input current;outputting the first input voltage to the first circuit; and outputtingthe third input voltage to the second circuit.
 16. The method of claim14, wherein first input voltage and the third input voltage comprise acommon mode voltage, wherein the first hysteresis exhibited by the firstcircuit and the second hysteresis exhibited by the second circuit areboth greater than a variance of the common mode voltage.
 17. The methodof claim 14, wherein the first hysteresis or the second hysteresis isvaried by varying a respective width of a transistor in the firstcircuit or the second circuit.
 18. The method of claim 14, wherein firsthysteresis or the second hysteresis exhibit a different amount ofhysteresis in a rising direction and a falling direction.
 19. The methodof claim 14, wherein the first hysteresis and the second hysteresis areprovided without a resistor divider network.
 20. The method of claim 14,wherein the first hysteresis and the second hysteresis are providedwithout varying the first input voltage or the third input voltage.